WorkflowDemployManagerView = Ext.extend(Ext.Panel, {
    constructor : function(a) {
        Ext.applyIf(this, a);
        var all=this.initUIComponents();
        WorkflowDemployManagerView.superclass.constructor.call(this, {
            id : "WorkflowDemployManagerView",
            region : "center",
            layout : "border",
            border : false,
            iconCls : "menu-position",
            items : [all.yearGridPanel,all.yearGridSearchPanel]
        });
    },
    initUIComponents : function() {
         var yearGridComponents=new creategridview({
            topbar : {
                inputFormName : 'WorkflowDemployForm',
                topbarAdd:{
                    hidden:false,
                    text:'新增部署'
                },
                topbarDel:{
                    hidden:true
                }
            },
            search : {
                items : [ ]
            },
            grid : {
                title : "流程部署信息列表",
                //全部不要则直接rowActions为false或者去掉该配置项，若想要单独的按钮，则单独配置
                rowActions:{
                    deletebtn:true
                },
                //取消行双击事件
                rowdblclick:false,
                //配置主键，不配置则默认主键为"id"
                key:"id",
                listUrl : __ctxPath + "/bpmndemo/listDemployWorkflow.do",
                removeUrl : __ctxPath + "/bpmndemo/delDeploymentWorkflow.do",
                fields : [ "id", 'name',{name:'deploymentTime',type:'date'}],
                columns : [ {
                    header : "ID",
                    dataIndex : "id",
                    width : 70
                },  {
                    header : "部署名称",
                    dataIndex : "name",
                    width : 100
                }, {
                    header : "部署时间",
                    dataIndex : "deploymentTime",
                    width : 100,
                    renderer:function(v){
                        if(v){
                            return v.format("Y-m-d H:i:s");
                        }
                    }
                }]
                
            }
        });
        return yearGridComponents;
    }
});